<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<base href="<%=basePath%>" />
<jsp:include page="/jsp/common.jsp" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>resource/css/product.css" />
<script type="text/javascript">
$().ready(function(){

	$("span.increase").bind("click",function(_id){
		var $input = $("#count"),
			_val = $input.val();
		if(isNaN(_val)){
			$input.val(1);
		} else {
			$input.val(parseInt(_val) + 1);
		}
	});

	$("span.decrease").bind("click", function(_id){
		var $input = $("#count"),
			_val = $input.val();
		if(isNaN(_val) || _val < 2){
			$input.val(1);
		} else {
			$input.val(parseInt(_val) - 1);
		}
	});

	$("#addCart").bind("click", function(){
		var url = "<%=basePath %>user/cartGood_save.do",
			data = {
				product_id : "${entity.id}",
				count : $("#count").val()
			},
			callback_Fn = function(_result){
				alert(_result.content);
			};
		$.post(url, data, callback_Fn, "json");
	});
});
</script>	
</head>
<body>
<jsp:include page="../header.jsp" />
<div class="content">
<div class="content_bar bar">
	<div class="div_p_01 content_div">
		<div class="hotProductCategory border_radius_3">
			<dl>
				<dt><a href="#">乌龙茶</a></dt>
				<dd><a href="#">铁观音</a></dd>
				<dd><a href="#">大红袍</a></dd>
				<dd><a href="#">肉桂</a></dd>
				<dd><a href="#">台湾乌龙</a></dd>
			</dl>
			<dl>
				<dt><a href="#">红茶</a></dt>
				<dd><a href="#">金俊眉</a></dd>
				<dd><a href="#">正山小种</a></dd>
				<dd><a href="#">祁门红茶</a></dd>
				<dd><a href="#">坦洋红茶</a></dd>
			</dl>
			<dl>
				<dt><a href="#">花果茶</a></dt>
				<dd><a href="#">菊花茶</a></dd>
				<dd><a href="#">玫瑰花茶</a></dd>
				<dd><a href="#">茉莉花茶</a></dd>
				<dd><a href="#">玄米茶</a></dd>
			</dl>
			<dl class="last">
				<dt><a href="#">精选茶具</a></dt>
				<dd><a href="#">功夫茶具</a></dd>
				<dd><a href="#">个人杯</a></dd>
				<dd><a href="#">茶宠</a></dd>
				<dd><a href="#">茶叶罐</a></dd>
			</dl>
		</div>
		<div class="hotProduct border_radius_3">
			<div class="title">热销商品</div>
			<ul>
				<li>
					<a href="#">2014秋茶 特级清馨清香铁观音</a>
					<div>
						<div>评分：</div>
						<div class="score8"></div>
						<div>4.0</div>
					</div>
					<div>
						销售价: <strong>￥188.00</strong>
					</div>
					<div>
						月销量：<em>0</em>
					</div>
				</li>
				<li>
					<a href="#">2014秋茶 特级清馨清香铁观音</a>
					<div>
						<div>评分：</div>
						<div class="score8"></div>
						<div>4.0</div>
					</div>
					<div>
						销售价: <strong>￥188.00</strong>
					</div>
					<div>
						月销量：<em>0</em>
					</div>
				</li>
				<li>
					<a href="#">2014秋茶 特级清馨清香铁观音</a>
					<div>
						<div>评分：</div>
						<div class="score8"></div>
						<div>4.0</div>
					</div>
					<div>
						销售价: <strong>￥188.00</strong>
					</div>
					<div>
						月销量：<em>0</em>
					</div>
				</li>
				<li>
					<a href="#">2014秋茶 特级清馨清香铁观音</a>
					<div>
						<div>评分：</div>
						<div class="score8"></div>
						<div>4.0</div>
					</div>
					<div>
						销售价: <strong>￥188.00</strong>
					</div>
					<div>
						月销量：<em>0</em>
					</div>
				</li>
				<li class="last">
					<a href="#">2014秋茶 特级清馨清香铁观音</a>
					<div>
						<div>评分：</div>
						<div class="score8"></div>
						<div>4.0</div>
					</div>
					<div>
						销售价: <strong>￥188.00</strong>
					</div>
					<div>
						月销量：<em>0</em>
					</div>
				</li>
			</ul>
		</div>
	</div>
	<div class="div_p_05 content_div">
		<div class="path border_radius_3">
			<ul>
				<li>首页</li>
				<li>乌龙茶</li>
				<li class="last">铁观音</li>
			</ul>
		</div>
		<div class="productImage">
			<a class="productA" href="#" onclick="return false;">
				<div class="zoomPad">
					<img class="zoomPadImg" src="${entity.images[0].url }" />
					<div class="zoomPup"></div>
					<div class="zoomWindow" style="display: none;">
						<div class="zoomWrapper">
							<div class="zoomWrapperImage">
								<img src="<%=basePath %>resource/images/p_41.jpg" />
							</div>
						</div>
					</div>
				</div>
			</a>
			<a class="prev" href="javascript:return false;"></a>
			<div class="scrollable">
				<div class="items">
				<c:forEach var="image" items="${entity.images}" varStatus="status">
					<a class='items_a ${status.index == 0 ? "current" : "" }' href="javascript:return false;">
						<img src="${image.url }" />
					</a>
				</c:forEach>
				</div>
			</div>
			<a class="next" href="javascript:return false;"></a>
		</div>
		<div class="name">
			${entity.name }
		</div>
		<div class="sn">
			<div>编号: ${entity.code }</div>
			<div>评分:</div>
			<div class="score10"></div>
			<div>5.0 (评分数: 1)</div>
		</div>
		<div class="info">
			<dl>
				<dt>销售价:</dt>
				<dd>
					<strong>￥${entity.price }</strong>市场价:<del>￥${entity.market_price }</del>
				</dd>
			</dl>
			<dl>
				<dt>促销:</dt>
				<dd>
					<a href="javascript:return false;">限时抢购</a>
				</dd>
			</dl>
			<dl>
				<dt>赠送积分:</dt>
				<dd>
					<span>288</span>
				</dd>
			</dl>
		</div>
		<div class="action">
			<dl class="quantity">
				<dt>购买数量:</dt>
				<dd>
					<input id="count" type="text" value="1" maxlength="4" onpaste="return false;"/>
					<div>
						<span class="increase" onselectstart='return false;'>&nbsp;</span>
						<span class="decrease" onselectstart='return false;'>&nbsp;</span>
					</div>
				</dd>
				<dd>
					件
				</dd>
			</dl>
			<div class="buy">
				<input id="addCart" type="button" class="addCart" value="加入购物车"/>
				<a href="<%=basePath %>jsp/order/cart.jsp">收藏商品</a>
			</div>
		</div>
	</div>
	<div class="div_p_06 content_div">
		<ul>
			<li class="introductionTab">
				<a href="javascript:;">商品介绍</a>
			</li>
			<li class="parameterTab">
				<a href="javascript:;">物流配送</a>
			</li>
			<li class="reviewTab">
				<a href="javascript:;">用户评价</a>
			</li>
		</ul>
	</div>
	<div class="div_p_07">
		<div class="title">
			<strong>商品介绍</strong>
		</div>
		<div>
			${entity.content }
		</div>
	</div>
	<div class="div_p_08">
		<div class="title">
			<strong>物流配送</strong>
		</div>
		<div>
			<img src="<%=basePath %>resource/images/wl_01.jpg" />
		</div>
		<div>
			<img src="<%=basePath %>resource/images/wl_02.gif" />
		</div>
	</div>
	<div class="div_p_09">
		<div class="title">
			<strong>用户评价</strong>
		</div>
		<div class="content">
			<div class="score">
				<strong>5.0</strong>
				<div>
					<div class="score10"></div>
					<div>评分数: 1</div>
				</div>
			</div>
			<div class="graph">
				<span>
					<em>5.0</em>
				</span>
				<div>&nbsp;</div>
				<ul>
					<li>非常不满意</li>
					<li>不满意</li>
					<li>一般</li>
					<li>满意</li>
					<li>非常满意</li>
				</ul>
			</div>
			<div class="handle">
				<a href="javascript:;">发表商品评论</a>
			</div>
			<table>
				<tr>
					<th>出差刚回来，确认晚了。茶叶还没品尝，物流挺快的，先给个五分。<div class="score10">&nbsp;</div>
					</th>
					<td>游客<span>2014-10-28</span></td>
				</tr>
			</table>
			<p>
				<a href="javascript:;">[查看所有评论]</a>
			</p>
		</div>
	</div>
</div>
</div>
<jsp:include page="../footer.jsp" />
</body>
</html>